﻿@{
ViewBag.Title = "报销单提报";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@section mystyle{

}

<!-- search -->
<!--<div class="content margin-top-20" id="search-box">
  <div class="container">
    <div class="row">
      <div class="col-sm-12">
        <div class="box padding-top-10 padding-bottom-10">
          <form class="form-inline">
            <div class="form-group">
              <label for="" class="margin-left-10">项目名称</label>
              <input type="search" name="search" id="search" class="form-control margin-left-10">


            </div>

            <div class="form-group">
              <label for="" class="margin-left-10">时间</label>
              <div class="datepk-box c-select vm w240 pop-style vm margin-left-10">
                <input type="text" name="" id="" readonly class="datepk form-control">
                <span class="c-select-btn"></span>
              </div>

              <span class="padding-left-10 padding-right-10 vm">至</span>

              <div class="datepk-box c-select vm w240 pop-style vm">
                <input type="text" name="" id="" readonly class="datepk form-control">
                <span class="c-select-btn"></span>
              </div>

              <label for="search"><span class="glyphicon glyphicon-search margin-10 font-16"></span></label>
            </div>

          </form>
        </div>
      </div>
    </div>
  </div>
</div>-->

<div class="container margin-top-20">
  <div class="row">
    <div class="col-sm12">
      <h3 class="padding-lr-12 margin-bottom-20">每月15日前需提交上月报销单，每个项目报销限提报1次/月</h3>
    </div>
    <div class="col-sm-1"><button type="button" id="prevMonth" class="btn btn-default btn-block"><span class="glyphicon glyphicon-triangle-left"></span></button></div>
    <div class="col-sm-1"><input type="text" name="" id="month" class="form-control text-center"></div>
    <div class="col-sm-1"><button type="button" id="nextMonth" class="btn btn-default btn-block"><span class="glyphicon glyphicon-triangle-right"></span></button></div>
  </div>
</div>
<!-- table -->
<div class="padding-top-10 padding-bottom-10 margin-top-20">
  <div class="container">
    <div class="row">

      <div id="table" class="col-sm-12 margin-top-20">
        <table class="table text-center" id="listTable"></table>
      </div>

      <div class="col-sm-12 clearfix">
        <!--<div class="pages"></div>-->
        <p class="float-left">总条数：<span id="totalRow">20</span></p>

        <div class="table-pagination float-right line-height-34 margin-left-10 text-center" id="pages"></div>

        <div class="float-right">
          <form class="form-inline">
            <span>显示条数：</span>
            <select name="pageSize" id="pageSize" class="form-control">
              <option value="10">10</option>
              <option value="20">20</option>
              <option value="30">30</option>
            </select>
          </form>
        </div>


      </div>
    </div>
  </div>
</div>

<script id="l43List" type="text/html">
  <thead>
  <tr>
    <th></th>
    <th>项目名称</th>
    <th>项目类型</th>
    <th>项目时间</th>
    <th>项目阶段</th>
    <!--<th>状态</th>-->
    <th class="">操作</th>
  </tr>
  </thead>
  <tbody>
  {{each $data}}
  <tr>
    <td>{{$index + 1}}</td>
    <td>{{$value.ProjectName}}</td>
    <td>{{$value.ProjectType}}</td>
    <td>{{$value.StartDate}} - {{$value.EndDate}}</td>
    <td>{{$value.State}}</td>
    <!--<td></td>-->
    <td>
      <!--<a class="btn btn-success prview" target="_blank" href="/Finance/Project/print/{{$value.MonthApplyID}}">预览报销单</a>-->
      <button type="button" class="btn btn-primary prview" >打印报销单</button>


      <!--<button type="button" class="btn btn-primary prview">打印报销单</button>-->
      {{if $value.State === '未提交' || $value.State.indexOf('驳回') !== -1}}
      <!--<button type="button" class="btn btn-primary" disabled="disabled">预览报销单</button>-->
      <button type="button" class="btn btn-danger margin-left-10 submit">提交报销单</button>
      <button type="button" class="btn btn-success margin-left-10 lookStep">查看进度</button>
      {{else if $value.State == '项目经理审核通过'}}
      <!--<button type="button" class="btn btn-primary prview">预览报销单</button>-->
      <button type="button" class="btn btn-danger margin-left-10 sent">寄出发票</button>
      <button type="button" class="btn btn-success margin-left-10 lookStep">查看进度</button>
      {{else}}
      <!--<button type="button" class="btn btn-primary prview">预览报销单</button>-->
      <button type="button" class="btn btn-danger margin-left-10" disabled="disabled">提交报销单</button>
      <button type="button" class="btn btn-success margin-left-10 lookStep">查看进度</button>
      {{/if}}
    </td>
  </tr>
  {{/each}}
  </tbody>

</script>


<!-- 提交报销单 -->
<div class="modal fade" id="editCost" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content padding-10 w700">
      <div class="text-right">
        <a class="close-pop" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span></a>
      </div>
      <div>
        <form class="form-horizontal">
          <div class="form-group">
            <label for="" class="col-sm-3 control-label">快递公司</label>
            <div class="col-sm-8">
              <select name="td1" id="td1" class="form-control">
                <option value="顺丰">顺丰</option>
                <option value="申通">申通</option>
              </select>
            </div>
          </div>

          <div class="form-group">
            <label for="" class="col-sm-3 control-label">快递单号</label>
            <div class="col-sm-8">
              <input type="email" class="form-control" name="td2" id="td2" placeholder="快递单号">
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-4 col-sm-offset-3">
              <button type="button" id="btn-save" class="btn btn-danger btn-block">发票已寄出，我要提交面单</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

<!-- 提交申请 -->
<div class="modal fade" id="postCost" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content padding-10 w700">
      <div class="text-right">
        <a class="close-pop" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span></a>
      </div>
      <div id="viewDetail"></div>
    </div>
  </div>
</div>

<script id="detail" type="text/html">
  <form class="form-horizontal">
    <div class="form-group">
      <ul class="step-list">
        {{each ApiParamObj as value i}}
        <li class="row">
          <div class="col-sm-6">
            <p>{{value.TriggerMan + value.IncidentContent}}</p>
            {{if value && value.IncidentContent.indexOf('驳回') !== -1 }}
              <p>驳回理由</p>
            {{/if}}
          </div>
          <div class="col-sm-6">
            <p>{{value.CreateTime}}</p>
            {{if value && value.IncidentContent.indexOf('驳回') !== -1 }}
            <p>{{value.Explain}}</p>
            {{/if}}
          </div>
        </li>
        {{/each}}

        <!--{{each ApiParamObj as value i}}-->
        <!--{{if value && value.IncidentContent.indexOf('驳回') !== -1 }}-->
          <!--<li class="row">-->
            <!--<div class="col-sm-12" style="text-align: center; margin-top: 10px;">{{value.Explain}}</div>-->
          <!--</li>-->
        <!--{{/if}}-->
        <!--{{/each}}-->
      </ul>
    </div>
  </form>
</script>

@section myscript{
<script src="~/Content/js/bind43.js"></script>
}